<?php
$request = Zend_Controller_Front::getInstance()->getRequest();
$action = $request->getActionName();
$controller = $request->getControllerName();

?>
<div id="sidebar">
    <div id="sidebar-wrapper"> <!-- Sidebar with logo and menu -->

        <h1 id="sidebar-title"><a href="/">Admin</a></h1>

        <!-- Logo (221px wide) -->
        <a href="/admin"><img id="logo" src="admin_/images/logo.png" alt="Simpla Admin logo"/></a>

        <ul id="main-nav">  <!-- Accordion Menu -->
            <li>
                <a href="/admin" class="nav-top-item <?= $controller == 'admin_index' ? 'current' : ''  ?>">
                    <!-- Add the class "current" to current menu item -->
                    Admins panel
                </a>
                <ul>
                    <li><a href="/">On site</a></li>
                </ul>
            </li>

            <li>
                <a href="/projects" class="nav-top-item <?= $controller == 'projects' ? 'current' : ''  ?>">
                    Projects
                </a>
                <ul>
                    <li><a href="projects/add">Write new</a></li>
                    <li><a href="projects">Management projects</a></li>

                </ul>
            </li>

            <li>
                <a href="/pages" class="nav-top-item <?= $controller == 'pages' ? 'current' : ''  ?>">
                    Pages
                </a>
                <ul>
                    <li><a href="/pages/add">Add new</a></li>
                    <li><a href="/pages">Management pages</a></li>

                </ul>
            </li>
            <li>
                <a href="/comments" class="nav-top-item <?= $controller == 'comments' ? 'current' : ''  ?>">
                    Comments
                </a>
                <ul>

                    <li><a href="/comments/edit">Management comments</a></li>

                </ul>
            </li>
            <li>
                <a href="/rotator" class="nav-top-item <?= $controller == 'rotator' ? 'current' : ''  ?>">
                    Rotator
                </a>
                <ul>
                    <li><a href="/rotator/add">Add picture</a></li>
                    <li><a href="/rotator/edit">Management rotator</a></li>

                </ul>
            </li>

              <li>
                <a href="/photos" class="nav-top-item <?= $controller == 'photos' ? 'current' : ''  ?>">
                    Gallery
                </a>
                <ul>
                    <li><a href="/photos/add">Add new photo</a></li>
                    <li><a href="/photos">Management gallery</a></li>

                </ul>
            </li>

            <li id="exitfromadmin"> <a href="/admin/exit"  class="nav-top-item <?= $controller == 'photos' ? 'current' : ''  ?>" onClick="location.href='/admin/exit';">
                                Exit
                            </a>
            </li>

        </ul>


    </div>
</div>
